﻿<UserControl x:Class="Sample.PhotoBrowser.ProgressBar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Sample.PhotoBrowser"
    Height="Auto" Width="Auto" IsHitTestVisible="False">
    <UserControl.Resources>
        <Storyboard RepeatBehavior="Forever" x:Key="ProgressBarRotation" BeginTime="0:0:0.0">
            <DoubleAnimation From="0" To="360" Storyboard.TargetName="ProgressRotate" Storyboard.TargetProperty="Angle"/>
        </Storyboard>
    </UserControl.Resources>
    <Grid x:Name="SecondProgressCircle" HorizontalAlignment="Center" Margin="0, 0, 0, 0">
        <Ellipse Width="100" Height="100" Fill="#FFCCCCCC" Stroke="DeepPink" StrokeThickness="3" Opacity="0.4"/>
        <Ellipse Width="85" Height="85" Stroke="DeepPink" StrokeThickness="5" StrokeDashArray="5, 3" RenderTransformOrigin="0.5, 0.5">
            <Ellipse.RenderTransform>
                <RotateTransform x:Name="ProgressRotate" Angle="0"/>
            </Ellipse.RenderTransform>
        </Ellipse>
        <Ellipse Width="60" Height="60" Fill="White" Stroke="DeepPink" StrokeThickness="3"/>
        <TextBlock Foreground="DarkGray" FontSize="15" FontWeight="Bold" Text="{Binding CurrentTaskPercentage, Converter={local:ProgressConverter}}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
    </Grid>
</UserControl>
